package sipoc.messaging;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.integration.annotation.Header;
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.annotation.Payload;
import org.springframework.integration.annotation.Poller;
import org.springframework.integration.annotation.ServiceActivator;

@MessageEndpoint
public class WireTapServiceActivator {
	private static final Logger LOGGER = LoggerFactory
			.getLogger(WireTapServiceActivator.class);

	@ServiceActivator(inputChannel = "registerEventChannel", requiresReply = "false", poller = @Poller(maxMessagesPerPoll = "5", fixedDelay = "10"))
	public void wireTap(@Header String countryCode, @Payload Integer sequence) {
		LOGGER.info("[ASYNC call]  event sent for {}-{}", countryCode,
				sequence);
	}
}
